#声明person类
class Person:
    def __init__(self,name,age):
        """初始化函数
        """
        self.name =name
        self.age = age
        
    def eat(self):
        print(self.name,"吃饭")
        
    def run(self):
        print(self.name,"跑步")
        
    def say_hello(self,target):
        print("hello:",target)
    
#根据类创建对象
p = Person("桑尼",15)
#获取对象属性值
print(p.name)
print(p.age)
p.eat()
p.run()
p.say_hello("小兰")


p2 = Person("杰瑞",13)
#获取对象属性值
print(p2.name)
print(p2.age)


    
    